package com.smart.upms.sys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 动态路由配置
 * </p>
 *
 * @author guxiaobai
 * @since 2018-12-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysZuulRoute implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * router Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 路由路径
     */
    private String path;

    /**
     * 服务名称
     */
    private String serviceId;

    /**
     * url代理
     */
    private String url;

    /**
     * 转发去掉前缀
     */
    private Boolean stripPrefix;

    /**
     * 是否重试
     */
    private Boolean retryAble;

    /**
     * 是否启用
     */
    private Boolean enable;

    /**
     * 敏感请求头
     */
    private String sensitiveHeadersList;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 删除标识（0-正常,1-删除）
     */
    @TableLogic
    private Boolean delFlag;


    public static final String ID = "id";

    public static final String PATH = "path";

    public static final String SERVICE_ID = "service_id";

    public static final String URL = "url";

    public static final String STRIP_PREFIX = "strip_prefix";

    public static final String RETRY_ABLE = "retry_able";

    public static final String ENABLE = "enable";

    public static final String SENSITIVE_HEADERS_LIST = "sensitive_headers_list";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String DEL_FLAG = "del_flag";

}
